package com.sq.util.json;

import com.sq.util.BeanUtil;
import com.sq.util.JsonUtil;

/**
 * @author sq
 *
 */
public class JsonDemo {
    public static void main(String[] args) throws Exception {
        Son s = new Son();
        s.setAa("aa");
        s.setBb("bb");
        Father f = (Father) s;

        System.out.println(f);
        System.out.println(BeanUtil.trans(s, Father.class));
        System.out.println(JsonUtil.toJson(f));
        System.out.println(JsonUtil.toJson(f, Father.class));
    }
}
